{{ header }}{{ column_left }}
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <div class="float-right">
        <button type="submit" form="form-user" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fas fa-save"></i></button>
        <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-light"><i class="fas fa-reply"></i></a></div>
      <h1>{{ heading_title }}</h1>
      <ol class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
          <li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
      </ol>
    </div>
  </div>
  <div class="container-fluid">
    {% if error_warning %}
      <div class="alert alert-danger alert-dismissible"><i class="fas fa-exclamation-circle"></i> {{ error_warning }}
        <button type="button" class="close" data-dismiss="alert">&times;</button>
      </div>
    {% endif %}
    <div class="card">
      <div class="card-header"><i class="fas fa-pencil-alt"></i> {{ text_form }}</div>
      <div class="card-body">
        <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-user">
          <div class="form-group row required">
            <label class="col-sm-2 col-form-label" for="input-username">{{ entry_username }}</label>
            <div class="col-sm-10">
              <input type="text" name="username" value="{{ username }}" placeholder="{{ entry_username }}" id="input-username" class="form-control"/>
              {% if error_username %}
                <div class="invalid-tooltip">{{ error_username }}</div>
              {% endif %}
            </div>
          </div>
          <div class="form-group row">
            <label class="col-sm-2 col-form-label" for="input-user-group">{{ entry_user_group }}</label>
            <div class="col-sm-10">
              <select name="user_group_id" id="input-user-group" class="form-control">
                {% for user_group in user_groups %}
                  {% if user_group.user_group_id == user_group_id %}
                    <option value="{{ user_group.user_group_id }}" selected="selected">{{ user_group.name }}</option>
                  {% else %}
                    <option value="{{ user_group.user_group_id }}">{{ user_group.name }}</option>
                  {% endif %}
                {% endfor %}
              </select>
            </div>
          </div>
          <div class="form-group row required">
            <label class="col-sm-2 col-form-label" for="input-firstname">{{ entry_firstname }}</label>
            <div class="col-sm-10">
              <input type="text" name="firstname" value="{{ firstname }}" placeholder="{{ entry_firstname }}" id="input-firstname" class="form-control"/>
              {% if error_firstname %}
                <div class="invalid-tooltip">{{ error_firstname }}</div>
              {% endif %}
            </div>
          </div>
          <div class="form-group row required">
            <label class="col-sm-2 col-form-label" for="input-lastname">{{ entry_lastname }}</label>
            <div class="col-sm-10">
              <input type="text" name="lastname" value="{{ lastname }}" placeholder="{{ entry_lastname }}" id="input-lastname" class="form-control"/>
              {% if error_lastname %}
                <div class="invalid-tooltip">{{ error_lastname }}</div>
              {% endif %}
            </div>
          </div>
          <div class="form-group row required">
            <label class="col-sm-2 col-form-label" for="input-email">{{ entry_email }}</label>
            <div class="col-sm-10">
              <input type="text" name="email" value="{{ email }}" placeholder="{{ entry_email }}" id="input-email" class="form-control"/>
              {% if error_email %}
                <div class="invalid-tooltip">{{ error_email }}</div>
              {% endif %}
            </div>
          </div>
          <div class="form-group row">
            <label class="col-sm-2 col-form-label" for="input-image">{{ entry_image }}</label>
            <div class="col-sm-10">
              <div class="card image">
                <img src="{{ thumb }}" alt="" title="" id="thumb-image" data-placeholder="{{ placeholder }}" class="card-img-top"/> <input type="hidden" name="image" value="{{ image }}" id="input-image"/>
                <div class="card-body">
                  <button type="button" data-toggle="image" data-target="#input-image" data-thumb="#thumb-image" class="btn btn-primary btn-sm btn-block"><i class="fas fa-pencil-alt"></i> {{ button_edit }}</button>
                  <button type="button" data-toggle="clear" data-target="#input-image" data-thumb="#thumb-image" class="btn btn-warning btn-sm btn-block"><i class="fas fa-trash-alt"></i> {{ button_clear }}</button>
                </div>
              </div>
            </div>
          </div>
          <div class="form-group row required">
            <label class="col-sm-2 col-form-label" for="input-password">{{ entry_password }}</label>
            <div class="col-sm-10">
              <input type="password" name="password" value="{{ password }}" placeholder="{{ entry_password }}" id="input-password" class="form-control" autocomplete="off"/>
              {% if error_password %}
                <div class="invalid-tooltip">{{ error_password }}</div>
              {% endif %}
            </div>
          </div>
          <div class="form-group row required">
            <label class="col-sm-2 col-form-label" for="input-confirm">{{ entry_confirm }}</label>
            <div class="col-sm-10">
              <input type="password" name="confirm" value="{{ confirm }}" placeholder="{{ entry_confirm }}" id="input-confirm" class="form-control"/>
              {% if error_confirm %}
                <div class="invalid-tooltip">{{ error_confirm }}</div>
              {% endif %}
            </div>
          </div>
          <div class="form-group row">
            <label class="col-sm-2 col-form-label" for="input-status">{{ entry_status }}</label>
            <div class="col-sm-10">
              <select name="status" id="input-status" class="form-control">
                {% if status %}
                  <option value="0">{{ text_disabled }}</option>
                  <option value="1" selected="selected">{{ text_enabled }}</option>
                {% else %}
                  <option value="0" selected="selected">{{ text_disabled }}</option>
                  <option value="1">{{ text_enabled }}</option>
                {% endif %}
              </select>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
{{ footer }} 